package org.x.note.socket;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class SocketServer {

	public static void main(String[] args) throws IOException {
		ServerSocket serverSocket = new ServerSocket(9999);
		while (true) {
			Socket socket = serverSocket.accept();
			SocketUtil socketUtil = new SocketUtil(socket, "UTF-8");
			socketUtil.receiveMessage();
			socketUtil.sendMessage("发发发", false);
		}
	}
}
